# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=creduce
pkgver=2.10.0
pkgrel=6
pkgdesc="A C/C++ program reducer"
url="https://embed.cs.utah.edu/creduce/"
#arch="all"
license="custom"
# util-linux provides lscpu
depends="clang indent perl perl-exporter-lite perl-file-which
	perl-getopt-tabular perl-regexp-common perl-term-readkey
	util-linux"
makedepends="clang-dev clang-static flex llvm-dev zlib-dev"
source="https://embed.cs.utah.edu/creduce/creduce-$pkgver.tar.gz
	204.patch"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--libexecdir=/usr/lib/$pkgname

	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="f2f2cc498cbf78331ea62e533579c84042ddc1ad8eb146adeae6b3a833e0ea4bb26a4ab5f1f61a30500a5a0c9c89cc1d4e4c8547aa9e4a14d3b5d744aeb4f6a7  creduce-2.10.0.tar.gz
c8c91ee37f6d633c34e6828a6235c409ec1e3f35292dc0722aa1c054ec8040cbd2bdb5f0792785a5c61cf3922c08f95ed819f9b1c2d82e793591c61dcbbb7249  204.patch"
